package house;

import returnTypes.FinalValues;

public class HouseSketch {
		private int[][][] houseMatrix;
		private final int maxY=FinalValues.getMaxY();
		private final int maxX=FinalValues.getMaxX();
		
		HouseSketch()
		{
			houseMatrix=new int[maxY][maxX][2];
		}
		
		public void importMatrix(int[][][] matrix)
		{
			houseMatrix=matrix;
		}
		public int getMatrixXY(int x,int y)
		{
			if ((x<maxX) && (y<maxY)){ return houseMatrix[x][y][0];}
			return -1;
		}
		public boolean setMatrixXY(int x,int y,int value)
		{
			if ((x<maxX) && (y<maxY)){ houseMatrix[x][y][0]=value; return true;}
			return false;
		}
		public int getMatrixOwnerXY(int x,int y)
		{
			if ((x<maxX) && (y<maxY)){ return houseMatrix[x][y][1];}
			return -1;
		}
		public void printSketch()
		{

				for(int i=0;i<maxX;i++){
					for(int j=0;j<maxY;j++)
						if (houseMatrix[i][j][0]<10)System.out.print(houseMatrix[i][j][0]);
						else System.out.print((char)houseMatrix[i][j][0]);
				System.out.println();
				}
			
		}
}

		